package com.jz.service.impl;

import com.jz.mapper.TestMapper;
import com.jz.model.UserVo;
import com.jz.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by WISE on 2021/12/23.
 */
@Service
public class TestServiceImpl implements TestService {

    @Autowired
    private TestMapper testMapper;

    @Override
    @Transactional//事务
    public List<UserVo> test(Integer id) {
        List<UserVo> userVos = testMapper.queryUserAll(id);

        return userVos;
    }

    @Override
    public List<UserVo> queryUserByIds(List<Integer> idList) {

        List<UserVo> userVos =  testMapper.queryUserByIds(idList);
        return userVos;
    }
}
